package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.entity.Test;
import com.wms.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@Api("测试管理")
@Slf4j
public class TestController {
    @Autowired
    TestService testService;
    @GetMapping("/test1")
    @ApiOperation(value = "测试查询")
    public ResultBean<Test> query(@ApiParam(name = "id",value = "这是测试id",required = true) @RequestParam(value = "id",required = true) int id){
        log.info("这是测试查询"+id);
        Map map=testService.get(id);
        log.info("查询的对象是"+map);
        return R.success("详情",map);
    }


}
